<template>
	<view class="dmm-container dmm-container-grey">
		<view class="settle-card">
			<view class="cardHeader">
				<image :src="agentInfo.agentBankcardIcon || '/static/imgs/avatar.png'" mode=""></image>

				<view class="desc">
					<text class="bankName">{{agentInfo.agentBankName}}银行</text>
					<text class="cardType">储蓄卡</text>
				</view>
			</view>

			<view class="cardNo">
				<text class="encrypted-text">****</text>
				<text class="encrypted-text">****</text>
				<text class="encrypted-text">****</text>
				<text class="finalNo">{{agentInfo.agentBankcardNo | slice(-4)}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		mapState
	} from "vuex"

	export default {
		data() {
			return {

			}
		},

		computed: {
			...mapState('home', ['agentInfo'])
		},
	}
</script>

<style lang="scss">
	.settle-card {
		background: #fff;
		width: 690rpx;
		border-radius: 16rpx;
		margin: auto;
		display: flex;
		flex-direction: column;
		padding: 40rpx 40rpx 30rpx;
		box-sizing: border-box;

		.cardHeader {
			display: flex;
			align-items: center;
			margin-bottom: 40rpx;

			image {
				height: 54rpx;
				width: 54rpx;
				margin-right: 28rpx;
			}
			
			.desc {
				display: flex;
				flex-direction: column;
			}

			.bankName {
				font-size: 30rpx;
				font-weight: 700;
				color: $u-main-color;
				margin-bottom: 10rpx;
			}

			.cardType {
				color: $uni-text-color-muted;
				font-size: 24rpx;
			}
		}

		.cardNo {
			display: flex;
			flex-direction: row;
			align-items: center;
			font-size: 36rpx;
			font-family: Helvetica Neue, Helvetica Neue-Medium;
			font-weight: 700;
			color: $u-main-color;
			padding-left: 80rpx;

			.encrypted-text {
				margin-right: 38rpx;
				vertical-align: sub;
			}
		}
	}
</style>
